<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        <input type="hidden" id="id" value="{$row.id|default=''}">

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('accounting.name')}</label>
            <div class="layui-input-inline layui-form-mid layui-word-aux">{$row.accounting_name|default=''}</div>
            <label class="layui-form-label">{:lang('day.progress_date')}</label>
            <div class="layui-input-inline layui-form-mid layui-word-aux">{$row.progress_date|default=''}</div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">{:lang('day.summary')}</label>
            <div class="layui-input-inline w-520">
                <textarea name="content" class="layui-textarea"
                          onchange="modifyContent(this)">{$row.content|default=''}</textarea>
            </div>
        </div>
    </form>
</div>
<script>
    layui.use(['myCommon'], function () {
        var $ = layui.jquery
            , myCommon = layui.myCommon;
        window.modifyContent = function (dom) {
            var $this = $(dom), data = {id: $('#id').val()};
            data[$this.attr('name')] = $this.val();
            myCommon.request.post({
                url: 'tally.summary/edit'
                , data: data
                , prefix: true
            });
        }
        myCommon.listen();
    });
</script>
